<div class="wrap js-check-wrap">
    <ul class="nav nav-tabs">
        {if condition="checkPath('upload/index')"}
        <li  class="active"><a href="{:url('upload/index')}">文件管理</a></li>
        {/if}
    </ul>
    <table class="table table-hover table-bordered">
        <thead>
        <tr>
            <th width="50">ID</th>
            <th>文件名</th>
            <th>文件类型</th>
            <th>文件大小</th>
            <th>关联模型</th>
            <th>上传时间</th>
            <th>显示</th>
            <th>状态</th>
            <th width="170">操作</th>
        </tr>
        </thead>
        <tbody>
        {foreach $list as $v}
        <tr>
            <td>{$v.id}</td>
            <td>{$v.name}</td>
            <td>{$v.extension}</td>
            <td>{$v.size}</td>
            <td>{$v.relation_model}</td>
            <td>{$v.create_time}</td>
            <td>
                {eq name="v.status" value="1"}显示{/eq}
                {eq name="v.status" value="0"}隐藏{/eq}
            </td>
            <td>
                {eq name="v.is_bind" value="1"}有效{/eq}
                {eq name="v.is_bind" value="0"}无效{/eq}
            </td>


            <td>
                <a href="<?php echo url('article/edit',['id' => $v['id']])?>">编辑</a> |
                <a class="a-post" post-msg="你确定要删除吗" post-url="<?php echo url('article/delete',['id' => $v['id']])?>">删除</a> |
                {if condition="$v['status'] == 1"}
                <a  class="a-post" post-msg="你确定要禁用吗？" post-url="<?php echo url('article/status',['id' => $v['id'],'param'=>0])?>" >关闭</a>
                {else /}
                <a class="a-post" post-msg="你确定要启用吗？" post-url="<?php echo url('article/status',['id' => $v['id'],'param'=>1])?>" >开启</a>
                {/if}
            </td>
        </tr>
        {/foreach}
        </tbody>
    </table>
    <div class="text-center">
        {$page}
    </div>
</div>
